package java_class_work.week03.practice01;

/**
 * 要求：封装一个人，具有姓名和年龄两个属性，并生成get、set方法
 */
public class People {
    private String name;
    private int age;

    void showinfo(){
        System.out.println(name+","+age+"岁");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
